package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.dto.chat.BussnessDto;
import com.atguigu.spzx.model.dto.order.createOrderDto;
import com.atguigu.spzx.model.vo.address.addressVo;
import com.atguigu.spzx.model.vo.chat.bussnessVo;
import com.atguigu.spzx.model.vo.sell.SellVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface HomeMapper {
    List<SellVo> GetAllsell();

    SellVo GetSellById(Integer id);

    bussnessVo GetAvatar(String bussnessName);

    void CreateChat(BussnessDto bussnessDto, Long userSId, String userSname);

    Long JudgeSame(Long userSId, Long userRId);

    void CreateMessage(Long conversationId, Long userSId);

    @Select("Select id, recipient, phone, address from useraddress where userId=#{id}")
    List<addressVo> GetUserAddress(Long id);

    void CreateBuyOrder(createOrderDto createOrderDto);

    void CreateNotpaymentBuyOrder(createOrderDto createOrderDto);

}
